home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2006 February
/
Gamestar_81_2006-02_dvd.iso
/
Red Shark
/
Common
/
NavPoint.script
< prev
next >
Wrap
Text File
|
2001-09-13
|
1KB
|
49 lines
//-------------------------------------------------------------------
//
// This code is copyright 2001 by G5 Software.
// Any unauthorized usage, either in part or in whole of this code
// is strictly prohibited. Violators WILL be prosecuted to the
// maximum extent allowed by law.
//
//-------------------------------------------------------------------
class CNavPoint
{
void CNavPoint()
{
CreateComponent("nav", "NavPoint", "CNavPointScriptHost");
SetCompoundObjectPositionable("nav");
Core_AddClassificator("NavPoint"); // for cockpit identification
}
}
class CNavPointScriptHost
{
void CNavPointScriptHost()
{
SetRadius( 20.f); // default navpoint radius
}
void OnSetCustomParameter( string _param)
{
if ( _param != "")
{
SetRadius( Core_String2Float( _param));
}
}
}
class CNavPointUser
{
vector GetNavPoint( string _Name)
{
return Core_CallFunction( "AIController", "GetNavPointByName", _Name);
}
float GetNavPointRadius( string _Name)
{
return Core_CallFunction( "AIController", "GetNavPointRadiusByName", _Name);
}
}